#pragma once

#include <QWebEngineView>
#include <QDomNode>
#include <TalkWindowShell.h>
#include <WindowManager.h>
class MsgHtmlObj;

class MsgWebView : public QWebEngineView
{
	Q_OBJECT


public:
	MsgWebView(QWidget *parent);
	~MsgWebView();

	void appendMsg(const QString &html, QString strObj = "0");

	void setID(QString a);

private:
	QList<QStringList> parseHtml(const QString &html);

	QList<QStringList> parseDomNode(const QDomNode &node);

	MsgHtmlObj *m_msgHtmlObj;

	QWebChannel *m_channel;
	QString m_jID;

signals:
	void signalSendMsg(QString &strData, int msgType, QString sFile = "");
};
